package com.mew.common.rest.gold;

import com.mew.common.rest.user.SimpleUserBO;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class GoldRankPlayersMessage extends ZebraBaseMessage<GoldRankPlayersMessage> {

    public int type;

    public long goldNumber;

    public List<SimpleUserBO> userList;

    @Override
    public void write(ByteBuf b) {

        writeInt(b,type);
        writeLong(b,goldNumber);
        writeInt(b,userList.size());
        for (SimpleUserBO userBO : userList) {
            userBO.write(b);
        }
    }

    @Override
    public GoldRankPlayersMessage read(ByteBuf byteBuf) {
        return null;
    }
}
